import axios from "@/utils/request"


const Api = {
  login: '/admin/login',
  passwordChange:'/admin/password',
  mail:'/admin/mail',
  passwordEmail:'/admin/password-email',
  code:'/admin/input-code',
  permission:'/admin/permission'
}

export function getCode(parameter){
  return axios({
      url:Api.code,
      method:'get',
      params:parameter
  })
}
export function getPermission(parameter){
  return axios({
      url:Api.permission,
      method:'get',
      params:parameter
  })
}


export function login(parameter){
    return axios({
      url:Api.login,
      method:'post',
      data:parameter
    })
}

export function mail(parameter){
  return axios({
    url:Api.mail,
    method:'post',
    data:parameter
  })
}

export function passwordChange(parameter){
  return axios({
    url:Api.passwordChange,
    method:'put',
    data:parameter
  })
}

export function passwordEmail(parameter){
  return axios({
    url:Api.passwordEmail,
    method:'put',
    data:parameter
  })
}
